#ifndef SQLITEUSERDAO_H_
#define SQLITEUSERDAO_H_

#include "../dao/UserDAO.h"
#include "../../../util/exception/SQLiteException.h"

#include <sqlite3.h>
#include <sstream>

using std::string;

class SQLiteUserDAO: public UserDAO {
private:
	sqlite3* database;

public:
	SQLiteUserDAO(sqlite3* database);

	virtual void save(const User& user);
	virtual void update(const User& user);
	virtual void remove(const User& user);
	virtual User loadUserById(int id);
	virtual User loadUserByDeviceCode(const string& code);
	virtual int countAll();
};

#endif /* SQLITEUSERDAO_H_ */
